import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

// expiration time
const ExpirationTime = 'expiration_time'
// 储存时间戳
export function getExpirationTime() {
  return Cookies.get(ExpirationTime)
}

export function setExpirationTime(time) {
  return Cookies.set(ExpirationTime, time)
}

// 存储token
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
